Skip to content

Recognize .htm files as HTML#9360

Open
Abdalla-Eldoumani wants to merge 1 commit intowarpdotdev:masterfrom
Abdalla-Eldoumani:abdalla/recognize-htm-as-html
Open

Recognize .htm files as HTML#9360
Abdalla-Eldoumani wants to merge 1 commit intowarpdotdev:masterfrom
Abdalla-Eldoumani:abdalla/recognize-htm-as-html

Conversation

@Abdalla-Eldoumani
Copy link
Copy Markdown

Description

language_by_filename in crates/languages/src/lib.rs recognizes .html but not the legacy three-character .htm extension. .htm is widely produced by static-site generators and historical web tooling (DOS 8.3 filename limits), and is already treated as an HTML/text file elsewhere in the codebase: see is_development_text_extension in crates/warp_util/src/file_type.rs:225, which lists "html" | "htm" together.

Opening a .htm file in Warp's editor today shows "Language support is unavailable for this file type" instead of HTML syntax highlighting. This PR resolves the inconsistency.

-        "html" => language_by_name("html"),
+        "html" | "htm" => language_by_name("html"),

Testing

  • Added html_extensions_resolve_to_html in crates/languages/src/lib_tests.rs covering both .html and .htm. The test calls language_by_filename(Path::new("index.htm")) and asserts display_name() == "HTML"; fails on master, passes after the change.
  • cargo fmt -p languages -- --check passes locally.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Changelog Entries for Stable

CHANGELOG-IMPROVEMENT: HTML files using the .htm extension now open with HTML syntax highlighting in Warp's editor.

@cla-bot cla-bot Bot added the cla-signed label Apr 29, 2026
@oz-for-oss
Copy link
Copy Markdown

oz-for-oss Bot commented Apr 29, 2026

@Abdalla-Eldoumani

I'm starting a first review of this pull request.

You can follow along in the session on Warp.

I approved this pull request. No matching stakeholder was found for the changed files, so no human reviewers were requested.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

I approved this pull request and requested human review from: @vorporeal, @alokedesai, @zachbai.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR maps .htm extensions to the existing HTML language entry and adds regression coverage for both .html and .htm filenames.

Concerns

  • None found in the changed lines.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR updates language detection so files ending in .htm resolve to the existing HTML language support, and adds a unit test covering both .html and .htm.

Concerns

  • No blocking correctness, security, error-handling, or performance concerns found in the changed lines.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Member

@szgupta szgupta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants